/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.syncro.registro.services;

import com.syncro.registro.entities.Grupo;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author bcamargo
 */
public class ComunicacionServiceThreadMock extends Thread {

    Grupo mGrupo;
    ComunicacionServiceMock mParent;
    public ComunicacionServiceThreadMock(Grupo grupo, ComunicacionServiceMock parent)
    {
        mGrupo = grupo;
        mParent = parent;
    }

    public void run()
    {
            double r = Math.random()*2000 + 300;
        try {
            Thread.sleep((long) r);
        } catch (InterruptedException ex) {
            Logger.getLogger(ComunicacionServiceThreadMock.class.getName()).log(Level.SEVERE, null, ex);
        }
        mParent.finalizarThread((int)(Math.random()*10), mGrupo);
    }

}
